<?php session_start();  include("include/connect.php");?>
<!DOCTYPE html>
<html style="overflow: hidden;" lang="en"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>BootCommerce Demo</title>    
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="BootCommerce is an E-commerce solution based on twitter bootstrap,perfect for any kind of shops.A complete Control Panel to manage Products, Categories, Orders,Clients and many system options">
    <meta name="keywords" content="e-commerce,ecommerce,bootstrap,twitter shop,shop,online sell,envato,codecanyon,template shop">
    <meta name="robots" content="INDEX,FOLLOW">
    <meta name="viewport" content="user-scalable=no,initial-scale=1.0, maximum-scale=1.0 width=device-width">
    <!-- Styles -->
    	 
	<link href="BootCommerce%20Demo_files/bootstrap.css" rel="stylesheet">
	<link href="BootCommerce%20Demo_files/bootstrap_extensions.css" rel="stylesheet">
	<link href="BootCommerce%20Demo_files/addons.css" rel="stylesheet">   
	<link href="BootCommerce%20Demo_files/bootstrap-responsive.css" rel="stylesheet">
	<link href="BootCommerce%20Demo_files/bootstrap_responsive_extensions.css" rel="stylesheet">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="include/js/html5shiv.js"></script>
    <![endif]--> 
    <link href="BootCommerce%20Demo_files/general-style.css" rel="stylesheet">       
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="include/img/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="include/img/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="include/img/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="include/img/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="include/img/ico/apple-touch-icon-57-precomposed.png">
    <!--[if lt IE 9]>
        <script src="include/js/html5shiv.js"></script>
    <![endif]--> 
 
	<link rel="stylesheet" href="css_jss/footable.core.min.css" type="text/css">
	<!--<link rel="stylesheet" href="cart.css" type="text/css">-->
	<script type="text/javascript" src="css_jss/jquery-1.11.1.min.js"  ></script>
	<script type="text/javascript" src="css_jss/bootstrap.min.js"  ></script>
	<script type="text/javascript" src="css_jss/custom.js"  ></script>
	<script type="text/javascript" src="css_jss/footable.min.js"  ></script>
	<script>
	function addtocart(id){
			
				$.ajax({
					url:'cart-control.php?action=add',
					type:'post',
					data: 'id='+id,
					beforeSend:function(){
						$('#more_popup').html('<div class="error" style="padding:30px;"><img  src="BootCommerce Demo_files/loader.gif" alt="Loading..." align="middle"/></div>');       
					},
					success:function(data){
					alert("added to cart");
					//window.location='index.php';
					}
				});
			}
	function removewish(id){
		$.ajax({
			url:'cart-control.php?action=wish_remove',
			type:'post',
			data: 'id='+id,
			beforeSend:function(){
				$('#more_popup').html('<div class="error" style="padding:30px;"><img  src="BootCommerce Demo_files/loader.gif" alt="Loading..." align="middle"/></div>');       
			},
			success:function(data){
	
				
			}
		});
	}
	</script>
  </head>  
  <body style="overflow-y:scroll;" > 
   <div class="scroll_body_container"><!-- CONTAINER FOR NICESCROLL PLUGIN (FIX CHROME SCROLLING PROBLEM) this will be closed into footer.php file -->
<section class="container-fluid" id="top-bar"> <!-- CONTAINER -->
  <div class="container-semifluid">
    <div class="row-fluid">
         <div class="span7">
           <div id="top-login-form-container">
              <form novalidate="novalidate" method="post" action="check.php" accept-charset="UTF-8" id="top-login-form">
                     <div class="control-group pull-left">
                       <div class="controls">
                         <div class="input-prepend">
                          <span class="add-on"><i class="icon-user"></i></span>
                          <input autocomplete="off" name="useridLog" id="top-useridLog" class="required" placeholder="UserID" type="text">
                         </div>
                       </div>
                     </div>
                     <div class="control-group pull-left">
                       <div class="controls">
                         <div class="input-prepend">
                          <span class="add-on"><i class="icon icon-black icon-key"></i></span>
                          <input name="passwordLog" id="top-passwordLog" class="required" placeholder="Password" value="" type="password">
                        </div>
                      </div>
                    </div>
                    <span class="btn btn-info unbordered solid squared" id="top-btn-login"><i class="icon icon-white icon-unlocked"></i> Login</span>
                    <div class="clearfix"></div>
              </form>
              <a href="#" class="retrieve-data">Forgotten Data?</a> | <a href="">Sign up</a>
           </div>
                         <div class="welcome-message">Welcome on Q8 Movies <a href="" id="btn-login-link">Login</a> | <a href="">Sign up</a></div>
                  </div>
       <div class="span1 text-right">
      	 <select style="width: 0px; height: 0px; outline: medium none; padding: 0px; margin: 0px; opacity: 0;" id="default_client_language" class="change_language_on_the_fly bootstyl text-left solid unbordered" name="default_client_language" data-verse="right">
  <option data-img-before="&lt;img src=&quot;lang/en_US/en_US.png&quot; style=&quot;margin-right:10px;&quot; /&gt;" value="en_US" selected="selected"></option><option data-img-before="&lt;img src=&quot;lang/it_IT/it_IT.png&quot; style=&quot;margin-right:10px;&quot; /&gt;" value="it_IT"></option></select>
       </div>
       <div class="span4">
		   <div class="row-fluid">
    <div class="span12 text-right">
           <ul class="nav topcart">
		   <style>
		   #top-bar{display:none;}
			#search-form{display:none;}
		   #shopping-cart-btn, .shopping-cart-btn {
				margin: 10px 15px 5px 15px;
				}
				.btn-sm, .btn-group-sm>.btn {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
.btn-default {
color: #333 !important;
background-color: #fff !important;
border-color: #ccc !important;
}
.btn {
display: inline-block !important;
padding: 6px 12px !important;
margin-bottom: 0 !important;
font-size: 14px !important;
font-weight: 400 !important;
line-height: 1.42857143 !important;
text-align: center !important;
white-space: nowrap !important;
vertical-align: middle !important;
cursor: pointer !important;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
user-select: none;
background-image: none !important;
border: 1px solid transparent !important;
border-radius: 4px !important;
}
.glyphicon {
position: relative !important;
top: 1px !important;
display: inline-block !important;
font-family: 'Glyphicons Halflings' !important;
font-style: normal !important;
font-weight: 400 !important;
line-height: 1 !important;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
		   </style>
                <li class="dropdown">  
				<span class="dropdown-toggle" data-toggle="dropdown">				
				<a href="" class="shopping-cart-btn btn btn-default btn-sm navbar-right"><strong><?=$_SESSION['total_number'];?></strong> items of <strong><?=$_SESSION['subtotal'];?></strong> in your <i class="glyphicon glyphicon-shopping-cart"></i></a>              
				</span>
				   <ul class="dropdown-menu squared">
                        <li>
                            <table>
                                <tbody class="product-tbody-container">
								<?php $total_number1=0;
									$total_price1 =0;
								if(isset($_SESSION['cart']))
									{
										foreach($_SESSION['cart'] as $cart_id => $x)
										{ 

											$total_number1 = $total_number1 + $x['qty'];	
										
											$results = mysqli_query($con, "SELECT * from product WHERE ProductID=$cart_id");
											$result = mysqli_fetch_array($results);
											$PID1 = $result['ProductID'];
											$im = $result['SmallImage'];
											$total_price1 = $total_price1 + ($result['Price']* ($x['qty'] ? $x['qty'] : 1));
											if($PID1>12310)
											{
												$im= substr($im, 0, -4);
												$im="poster/".$im."_thumbnail.jpg";
											}
											else if($PID1<=12310)
											{
												$im="poster/".$im;
											}
								?>
									<tr>
									  <td class="image">
									   <img class="lazy" data-original="http://q8movies.com/<?=$im;?>" src="http://q8movies.com/<?=$im;?>" alt="fast and furious 6" style="display: inline;">
									  </td>
									  <td class="name">
										<a href=""><?=$_SESSION['ProductName'];?></a><br>
										<strong><?=$total_number1;?></strong> x <?=$total_price1;?>
										
									  </td>  							                                
									  <td class="remove"><a href="?id=<?=$result['ProductID'];?>&action=remove"><span class="btn btn-danger btn-small remove-from-cart tooltiped" title="Remove from Cart" data-options-item="be832" data-id-item="12804"><i class="icon-white icon-trash"></i></span></a></td>
									</tr>   
								<?php } } ?>
								</tbody>
                            </table>
                                                        
							<table>
                                <tbody class="counts-container">
                                    <tr>
                                        <td class="text-right"><strong>Subtotal:</strong></td>
                                        <td class="text-right subtotal"><?=$_SESSION['subtotal'];?></td>
                                    </tr>
                                    <tr>
                                        <td class="text-right"><strong>Vat:</strong></td>
                                        <td class="text-right tax">4.23</td>
                                    </tr>
									                                    
                                    <tr>
                                        <td class="text-right"><strong>Total:</strong></td>
                                        <td class="text-right total"><?php echo $_SESSION['subtotal']+4.23;?></td>
                                    </tr>
                                </tbody>
                            </table>
                                                       <div class="text-center cart-options-container"> <a class="btn btn-info squared solid unbordered" href="">Cart</a> <a class="btn btn-primary squared solid unbordered" href="">Checkout</a> </div>
                        </li>
                    </ul>
                </li>
            </ul>    
    </div>
  </div>       </div>
    </div>
  </div>
</section>
<header>
 <section class="container-semifluid" id="header-container"> <!-- CONTAINER -->
  <div class="row-fluid"> <!-- ROW -->
    <div class="span4 logo-container">
      <a href=""><img src="BootCommerce%20Demo_files/bc_logo.png" alt=""></a>
    </div>
    <div class="span3 text-right">
              <form id="search-form" class="form-search form-horizontal" action="search.php" method="get">
            <div class="input-append span12">
                <input autocomplete="off" name="sp" class="search-query" placeholder="Search..." type="text">
                <button type="submit"><i class="icon-search"></i></button>
            </div>
        </form>
          </div>
    <div class="span5 main-menu-container text-right">
      <a href=""><i class="icon-user"></i> Your Account</a>
      <a href=""><i class="icon-shopping-cart"></i> Shopping Cart</a>
      <a href=""><i class="icon-ok-circle"></i> Checkout</a>
      <a href=""><i class="icon icon-black icon-contacts"></i> Contact Us</a>
    </div>
  </div> <!-- /ROW -->
 </section>
</header>
<div class="clearfix"></div>    
   <section class="container-semifluid" id="main-container"> <!-- CONTAINER -->     
          
	<section class="row-fluid cart-page"><!-- BODY ROW -->               
	    <section class="span12 cart-container"> 
		        <?php
					if(isset($_SESSION['CID']))
					$CID=$_SESSION['CID'];
					else
					$CID="";

					if($CID!="")
					{
						$uName= $_SESSION['uName'];

						require("include/connect.php");
						$total_number=0;
						$total_price =0;

						$sql="select * from wishlist where CustomerID='$CID'";
						$res=mysqli_query($con,$sql);
						if(mysqli_num_rows($res) > 0){
				?>
            
             <div class="products-list-div">                             
              <div class="row-fluid">
                <div class="span12" id="products-list-table">  
						<table class="table-striped table-condensed">
							<thead>
								<tr>
									<tr>
								  <th >Item Description</th>
								  <th >image</th>
								  <th >Price</th>
								  <th >Qty.</th>
									  <th>Remove</th>
									<th>Add to cart</th>
								</tr>
							</thead>
							<tbody class="product-tbody-container">
							<?php 
while($result=mysqli_fetch_array($res))
{
$wishPID=$result['ProductID'];

$sqll="select ProductName,ProductName,Price,SmallImage from product where ProductID='$wishPID'";
$ress=mysqli_query($con,$sqll);
$resultt=mysqli_fetch_array($ress);
$image = $resultt['SmallImage'];
$im="poster/".$image;

	?>
<tr>
         <td><?=$resultt['ProductName'];?></td>
        <td class="image" data-title="Image"> <img class="lazy" data-original="http://q8movies.com/<?=$im;?>" src="http://q8movies.com/<?=$im;?>" alt="Oblivion" style="display: inline;">
	</td>
            
          <td><?=$resultt['Price'];?></td>
          <td>
          <?php echo "1";?>
         </td>
       
          <td><a class="btn btn-danger btn-small remove-from-cart tooltiped" onclick="removewish(<?=$wishPID;?>);"><i class="icon-white icon-trash"></i></a></td>
		  
		<td>
			<a class="btn btn-success btn-small update-cart tooltiped" onclick="addtocart(<?=$wishPID;?>);" ><i class="icon-shopping-cart"></i></a>
		
			
		
		
        </tr>
		<?php 
		}
		?>
							</tbody>
						</table>
                </div>
              </div>
              
             </div>  
			 <?php }else{ ?>
			<div class="alert-cart-container row-fluid">
                <div class="span12">
                   <div class="alert alert-warning alert-block squared solid unbordered"><h4>CAUTION!!!<br><br> your wishlist is empty</h4></div>
                    <br>
                    <a class="btn btn-info btn-large squared solid unbordered pull-right" href="http://grabwebs.com/commerce/nithin3">Return to Shopping</a>                   
                </div>
              </div>
			<?php }
			 }else{ ?>
			<div class="alert-cart-container row-fluid">
                <div class="span12">
                   <div class="alert alert-warning alert-block squared solid unbordered"><h4>CAUTION!!!<br><br> Please login to see your wishlist</h4></div>
                    <br>
                    <a class="btn btn-info btn-large squared solid unbordered pull-right" href="http://grabwebs.com/commerce/nithin3">Return to Shopping</a>                   
                </div>
              </div>
			  <?php }?>			 
       </section>                       
     </section>
	<footer>
  <div class="container-fluid" id="footer">
   <div class="container-semifluid">   
      <div class="row-fluid">
        <div class="span6">        
          <img src="BootCommerce%20Demo_files/bc_logo_footer.png" alt="http://www.mrplugins.it/bootcomemrce" width="30%">
          <p style="text-align:justify">
          "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
 do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim 
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut 
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit 
in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
Excepteur sint occaecat cupidatat non proident, sunt in
          </p>
         <div class="clearfix"></div>
        </div>
        <div class="span3">
          <div class="box-header">
            <span class="header-text" style="white-space:nowrap;">Your Account</span>   
          </div>         
         <ul class="menu-vertical-indicator">
           <li><a href="">General Info</a></li>
           <li><a href="">Addresses</a></li>
           <li><a href="">Orders</a></li>
           <li><a href="">Contact Us</a></li>
         </ul>
         <div class="clearfix"></div>
        </div>
        <div class="span3">
          <div class="box-header">
            <span class="header-text" style="white-space:nowrap;">Contact Us</span>   
          </div>         
         <ul>
           <li><img src="BootCommerce%20Demo_files/footer-phone.png">1234564545</li>
           <li><img src="BootCommerce%20Demo_files/footer-email.png"> contact@q8movies.com</li>
           <li><img src="BootCommerce%20Demo_files/footer-marker.png"> abc, xyz</li>
         </ul>
         <div class="clearfix"></div>
        </div>       
                     
      </div>
      
   </div>
  </div>    
</footer>
<!-- retrieve user's data form -->						 
<div id="retrieve-data-modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="retrieve-data-modallabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><li class="icon-remove"></li></button>
    <span id="retrieve-data-modallabel"><strong class="label label-info">Retrieve Your access data</strong></span>
  </div>  
  <div class="modal-body">
     <div id="retrieve-result" class="hide"></div>
     <form novalidate="novalidate" method="post" action="retrieve-data.php" accept-charset="UTF-8" id="retrieve-data-form">    		  
         <div class="control-group">
           <div class="controls">
            <label for="userid-retrieve">UserID</label>
             <div class="input-prepend">
              <span class="add-on"><i class="icon-user"></i></span>              
              <input autocomplete="off" name="userid_retrieve" id="userid-retrieve" class="leastoneinput" placeholder="UserID" type="text">   
             </div> 
           </div>                       
         </div>
         <div class="control-group">
           <div class="controls">  
             <label for="email-retrieve">E-mail</label> 
             <div class="input-prepend">                          
              <span class="add-on"><i class="icon-envelope"></i></span>              
              <input autocomplete="off" name="email_retrieve" id="email-retrieve" class="leastoneinput email" placeholder="E-mail" type="text">
            </div>
          </div>                                           
        </div>   
        <span class="btn btn-info unbordered solid squared pull-right" id="btn-retrieve-data"><i class="icon-white icon-wrench"></i> Retrieve data</span>
        <div class="clearfix"></div>              
       </form>  
  </div>
</div> 
<!-- / retrieve user's data form -->							
<a style="" id="go-to-top"></a>
</div><!-- CLOSE CONTAINER FOR NICESCROLL PLUGIN (FIX CHROME SCROLLING PROBLEM), div opened into body-header.php file -->
 
</body>
</html>	